<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - FooTable</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="/favicon.ico"> <link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/static/admin/css/plugins/footable/footable.core.css" rel="stylesheet">

    <link href="/static/admin/css/animate.css" rel="stylesheet">
    <link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/static/admin/layui/css/layui.css" rel="stylesheet">


</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">

            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>新资源</h5>
                                  <div style="margin-left: 100px;"><a href="" >一键分配</a><a href="" style="margin-left:50px;">批量分配</a><a href=""></a></div>
                            <div class="ibox-tools">
                             
                               
                                 <div class="ibox-tools tools">
                            <a class="dropdown-toggle" data-toggle="dropdown" href="">
                                    <i class="fa fa-wrench" title="转移"></i>
                                </a>
                        </div>
                                
                                
                                <div class="ibox-tools tools">
                            <a href="/admin/student/information.html"><i class="glyphicon glyphicon-plus" title="添加"></i></a>
                        </div>
                            </div>
                        </div>
                        <div class="ibox-content">

                            <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="8">
                                <thead>
                                <tr>
                                    <th >全选</th>
                                    <th data-hide="all">编号</th>
                                    <th data-toggle="true">姓名</th>
                                    <th>电话</th>
                                    <th data-hide="all">身份证号</th>                             
                                    <th data-hide="all">地址</th>
                                    <th data-hide="all">性别</th>                                   
                                    <th data-hide="all">邮箱</th>
                                    <th data-hide="all">备注</th>
                                    <th >创建时间</th>
                                    <th >修改日期</th>                                   
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {foreach $res as $vo}
                                <tr>

                                    <td><input type="checkbox" data-id="{$vo.re_id}" class="checkid"></td>
                                    <td>{$vo.re_id}</td>
                                    <td>{$vo.re_name}</td>
                                    <td>{$vo.re_tel}</td>
                                    <td>{$vo.re_zheng}</td>
                                    <td>{$vo.re_address}</td>
                                    <td>{if condition="$vo.re_sex eq 1"}女{else/}男{/if}</td>
                                    <td>{$vo.re_email}</td>
                                    <td>{if condition="!empty($vo.failed_content)"}{$vo.failed_content}{else /}无{/if}</td>
                                    <td>{$vo.create_time}</td>
                                    <td>{$vo.update_time}</td>
                                    <td>

                                        {if condition="$vo.re_status eq 0"}
                                          <span style="color:#27c24c;">新资源</span>
                                        {elseif condition="$vo.re_status eq 1"/}
                                          <span style="color:#f8ac59;">咨询中</span>
                                        {/if}
                                    </td>
                                    <td class="cz">
                                        <a href=""><i class="fa fa-sign-out signout" title="转出" data-id="{$vo.re_id}"></i></a>
                                        <a href="{:url('Resourceboolss/update')}?id={$vo.re_id}"><i class="fa fa-pencil edit" title="编辑" data-id="{$vo.re_id}"></i></a>
                                        <a><i class="fa fa-trash del" title="删除" data-id="{$vo.re_id}"></i></a>
                                    </td>
                                </tr>
                                {/foreach}
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="5">
                                        <ul class="pagination pull-right"></ul>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
           
        </div>
    <!-- 全局js -->
    <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/static/admin/js/plugins/footable/footable.all.min.js"></script>
    <script src="/static/admin/layui/layui.js"></script>
    <!-- 自定义js -->
    <script src="/static/admin/js/content.js?v=1.0.0"></script>
    <script>
        //初始化膨胀表格
        $(document).ready(function() {
            $('.footable').footable();
            $('.footable2').footable();
        });

        //layui

        layui.use('layer', function(){ //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
            //转出
            $(".signout").click(function(){

                $.post("{:url('Resourceboolss/signout')}",{},function(data){
                    layer.msg(data.msg,{time:2000},function(){
                        if(data.url){
                            window.location.href = data.url;
                        }
                    });

                })
            });
            //删除
            $(".del").click(function(){
                var obj = $(this);
                layer.confirm('确定要删除吗？', {
                    btn: ['确定', '取消']
                    ,btn1: function(index, layero){

                        $.post("{:url('Resourceboolss/del')}",{id:obj.attr("data-id")},function(data){
                            layer.msg(data.msg,{time:2000},function(){
                                if(data.url){
                                    window.location.href = data.url;
                                }
                            });

                        });
                    }
                });

            });

        });


    </script>

</body>

</html>
